package uutalk.netcloud.talk.base.util;

import java.util.Comparator;

import uutalk.netcloud.talk.model.bean.FriendInfoBean;

public class PinyinComparator implements Comparator<FriendInfoBean> {

	public int compare(FriendInfoBean o1, FriendInfoBean o2) {
		if (o1.getFriendIndex().equals("@")
				|| o2.getFriendIndex().equals("#")) {
			return 1;
		} else if (o1.getFriendIndex().equals("#")
				|| o2.getFriendIndex().equals("@")) {
			return -1;
		} else {
			return o1.getFriendIndex().compareTo(o2.getFriendIndex());
		}
	}

}
